﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace UFPC.Models
{
    [MetadataType(typeof(CustomerValidation))]
    public partial class Customer
    {
        //public Address CustomerAddress { get; set; }
    }
    
    [Bind(Exclude="CustomerId")]
    public class CustomerValidation
    {
        [DisplayName("Name")]
        [StringLength(100, ErrorMessage = "Name may not be longer than 100 characters")]
        public string Name { get; set; }

        [DisplayName("Contact")]
        [StringLength(50, ErrorMessage = "Contact may not be longer than 50 characters")]
        public string Contact { get; set; }

        [DisplayName("Phone")]
        public string Phone { get; set; }

        [DisplayName("Fax")]
        public string Fax { get; set; }
    }
}